package com.dfbz.demo07_构造方法继承的特点;

/**
 * @author lscl
 * @version 1.0
 * @intro:
 */
public class Demo01 {
    public static void main(String[] args) {
        Zi zi = new Zi(10);
    }
}

class Fu {

    public Fu() {
        System.out.println("fu 无参...");
    }

    public Fu(int a) {
        System.out.println("fu 有参...");
    }
}

class Zi extends Fu {
    public Zi(){
        // 调用父类的无参构造方法来初始化父类
//        super();
        this(10);
        System.out.println("Zi 无参...");
    }


    public Zi(int a){
//        super(10);
        System.out.println("Zi 有参...");
    }
}